package com.wyh.controller.feemanagementcontroller;


import com.wyh.common.result.Result;
import com.wyh.domain.po.feemanagementpo.Resourcees;
import com.wyh.service.feemanagementservice.IResourceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 资源表 前端控制器
 * </p>
 *
 * @author ggt
 * @since 2024-05-21
 */
@RestController
@RequestMapping("/resource")
@RequiredArgsConstructor
@Api(tags = "资源管理")
public class ResourceController {

    private final IResourceService resourceService;


//    @ApiOperation("新增资源")
//    @PostMapping("/add")
//    public void saveResource(@RequestBody Resourcees resourcees){
//        resourceService.save(resourcees);
//
//    }

//    @ApiOperation("根据资源类型查询资源")
//    @GetMapping("/list/{type}")
//    public Result<List<Resourcees>> listResource(@ApiParam("资源类型") @PathVariable("type") Integer type){
//        return Result.success(resourceService.listByType(type));
//    }

//    @ApiOperation("根据所属楼栋查询对应资源")
//    @GetMapping("/listByBuilding/{buildingid}")
//    public Result<List<Resourcees>> listResourceByBuildingId(@ApiParam("所属楼栋id") @PathVariable("buildingid") Integer buildingid){
//        return Result.success(resourceService.getResourceListByBuildingUtilId(buildingid));
//    }
}
